package validator;

import java.io.File;

/**
 * 自定义方法，对应到自定义的jquery validation方法
 * @author heantai
 *
 */
public class Methods extends JqueryMethod {
	
	public final static String LIANTONG="liantong";
	
	static{
		MESSAGES.put(LIANTONG, "请输入联通号");
	}
	
	public static boolean liantong(Object value,String param){
		if(value==null||value.toString().isEmpty()){
			return true;
		}
		
		return value.toString().matches("^(130|131|132|155|156|185|186)\\d{8}$");
	}

	public static void main(String[] args) {
		File f=new File("C:\\ConnectifyNetServices.ini");
		System.out.println(f);
		System.out.println(f.toString().matches(".*(png|jpe?g|gif|ini)$"));
		System.out.println("13011111111".matches("^(130|155)\\d{8}$"));
		System.out.println(MAXLENGTH);
	}
	
	
}
